<script setup>
import { getCurrentInstance, ref } from "vue";

const { proxy } = getCurrentInstance();
const title = ref("Hello uni-app");
const testStore = proxy.$store.test.useTestStore();
const userStore = proxy.$store.user.useUserStore();

const addPro = () => {
  // testStore.addCount()
  userStore.setData("name");
};
const onShareAppMessage = (res)=>{
    if (res.from === 'button') {// 来自页面内分享按钮
      console.log(res.target)
    }
    return {
      title: '自定义分享标题',
      path: '/pages/index/index'
    }
  }
</script>
<template>
  <view class="content">
    <image class="logo" src="/static/logo.png"></image>
    <view class="text-area p-30rpx" @click="addPro">
		微信页面2222
      <text class="title">{{ title }}</text>
      {{ testStore.count }}{{ userStore.token }}
    </view>
  </view>
</template>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
